package com.nexen.merchant.serviceRequest.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nexen.common.annotation.Excels;
import com.nexen.common.annotation.Sensitive;
import com.nexen.common.enums.DesensitizedType;
import com.nexen.merchant.barcode.domain.NexenBarcode;
import com.nexen.merchant.member.domain.NexenMember;
import com.nexen.merchant.warrantyCard.domain.NexenWarrantycard;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.nexen.common.annotation.Excel;
import com.nexen.common.core.domain.BaseEntity;

/**
 * 换胎申请对象 nexen_ServiceRequest
 * 
 * @author xiao
 * @date 2024-08-03
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY,getterVisibility = JsonAutoDetect.Visibility.NONE)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class NexenServicerequest extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** Id */
    private Long Id;

    /** 会员ID */
    private Long MemberId;
    @Excels({
            @Excel(name = "姓名", targetAttr = "Name", type = Excel.Type.EXPORT),
            @Excel(name = "手机号", targetAttr = "Mobile", type = Excel.Type.EXPORT),
            @Excel(name = "车牌号", targetAttr = "LicencePlate", type = Excel.Type.EXPORT),
            @Excel(name = "驾驶证", targetAttr = "DriverLicence", type = Excel.Type.EXPORT),
    })
    private NexenMember memberInfo;

    /** 质保卡ID */
    private Long CardId;
    @Excels({
            @Excel(name = "质保卡号", targetAttr = "cardNumber", type = Excel.Type.EXPORT),
            @Excel(name = "省份", targetAttr = "Province", type = Excel.Type.EXPORT),
            @Excel(name = "城市", targetAttr = "City", type = Excel.Type.EXPORT),
            @Excel(name = "购买日期", targetAttr = "BuyDay", dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT),
    })
    private NexenWarrantycard warrantyCardInfo;

    /** 质保卡号 */
    private String cardNumber;

    /** 图片 */
    private String Name;
    /** 图片 */
//    @Sensitive(desensitizedType = DesensitizedType.PHONE)
    private String Mobile;
    /** 图片 */
    private String Province;
    /** 图片 */
    private String City;
    private List<String> cityList;

    @Excel(name = "轮胎条形码1")
    private String TireCode1;
    /** 图片 */
//    @Excel(name = "轮胎条形码1图片")
    private String Images;
    @Excels({
            @Excel(name = "成品代号", targetAttr = "productCode", type = Excel.Type.EXPORT),
            @Excel(name = "SIZE名", targetAttr = "productName", type = Excel.Type.EXPORT),
            @Excel(name = "生产日期", targetAttr = "productionDate", type = Excel.Type.EXPORT),
            @Excel(name = "目的地", targetAttr = "destination", type = Excel.Type.EXPORT),
    })
    private NexenBarcode TireCode1Info;

    @Excel(name = "轮胎条形码2")
    private String TireCode2;
    /** 图片 */
//    @Excel(name = "轮胎条形码2图片")
    private String Images2;
    @Excels({
            @Excel(name = "成品代号", targetAttr = "productCode", type = Excel.Type.EXPORT),
            @Excel(name = "SIZE名", targetAttr = "productName", type = Excel.Type.EXPORT),
            @Excel(name = "生产日期", targetAttr = "productionDate", type = Excel.Type.EXPORT),
            @Excel(name = "目的地", targetAttr = "destination", type = Excel.Type.EXPORT),
    })
    private NexenBarcode TireCode2Info;

    @Excel(name = "轮胎条形码3")
    private String TireCode3;
    /** 图片 */
//    @Excel(name = "轮胎条形码3图片")
    private String Images3;
    @Excels({
            @Excel(name = "成品代号", targetAttr = "productCode", type = Excel.Type.EXPORT),
            @Excel(name = "SIZE名", targetAttr = "productName", type = Excel.Type.EXPORT),
            @Excel(name = "生产日期", targetAttr = "productionDate", type = Excel.Type.EXPORT),
            @Excel(name = "目的地", targetAttr = "destination", type = Excel.Type.EXPORT),
    })
    private NexenBarcode TireCode3Info;

    @Excel(name = "轮胎条形码4")
    private String TireCode4;
    /** 图片 */
//    @Excel(name = "轮胎条形码4图片")
    private String Images4;
    @Excels({
            @Excel(name = "成品代号", targetAttr = "productCode", type = Excel.Type.EXPORT),
            @Excel(name = "SIZE名", targetAttr = "productName", type = Excel.Type.EXPORT),
            @Excel(name = "生产日期", targetAttr = "productionDate", type = Excel.Type.EXPORT),
            @Excel(name = "目的地", targetAttr = "destination", type = Excel.Type.EXPORT),
    })
    private NexenBarcode TireCode4Info;

    /** 状态 1:待审核,2:已通过,3:未通过,4:已使用,5:已过期 */
    @Excel(name = "状态", readConverterExp = "1=待审核,2=已通过,3=未通过,4=已使用,5=已过期")
    private Long Status;

    @Excel(name = "审核人")
    private String auditBy;     // 审核人

    /** 购买日期 */
//    @Excel(name = "购买日期")
    private String OrderDay;

    /** 审核备注 */
    @Excel(name = "审核备注")
    private String StatusMemo;

    /** 审核备注 */
    @Excel(name = "审核时间")
    private String auditTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date Created;

    /** 质保卡下标 */
    private String TireIndex;

    /** 轮胎条形码 */
    private String NewTireCode;

    private int sendSms;    // 0:已发送，1:未发送

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("Id", getId())
            .append("Name", getName())
            .append("Mobile", getMobile())
            .append("Province", getProvince())
            .append("City", getCity())
            .append("Images", getImages())
            .append("Status", getStatus())
            .append("OrderDay", getOrderDay())
            .append("Created", getCreated())
            .append("StatusMemo", getStatusMemo())
            .append("MemberId", getMemberId())
            .append("CardId", getCardId())
            .append("TireIndex", getTireIndex())
            .append("NewTireCode", getNewTireCode())
            .append("auditBy", getAuditBy())
            .append("auditTime", getAuditTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
